using System;
using System.Collections;
using System.Collections.Generic;

using Atom.Data.Base;

namespace Atom.Data.BusinessObjects
{
    public partial class HBalanceRecord : BusinessBase<string>
    {
        #region Declarations

		private int _balanceid = default(Int32);
		private int _operatetype = default(Int32);
		private string _invoiceid = String.Empty;
		private string _inhosid = null;
		private int _currentinhosmark = default(Int32);
		private System.DateTime _leavehosdate = new DateTime();
		private int _inhosdays = default(Int32);
		private System.DateTime _balancedate = new DateTime();
		private decimal _totalconsumemoney = default(Decimal);
		private decimal _paymentmoney = default(Decimal);
		private decimal? _infactmoney = null;
		private decimal _cashreturn = default(Decimal);
		private decimal _chequereturn = default(Decimal);
		private System.DateTime _operatedate = new DateTime();
		private string _operatorid = null;
		private decimal _cashadvance = default(Decimal);
		private decimal _chequeadvance = default(Decimal);
		private decimal _patchmoney = default(Decimal);
		private decimal _discountpay = default(Decimal);
		private decimal _personalmoney = default(Decimal);
		private decimal _agreementmoney = default(Decimal);
		private decimal? _outhosarrearage = null;
		private decimal _yeardiscountpayaccumulative = default(Decimal);
		private decimal _yeardiscountpaymoney = default(Decimal);
		private decimal _startmoney = default(Decimal);
		private decimal _medicareaccumulativemoney = default(Decimal);
		private decimal _personalaccountpay = default(Decimal);
		private int _midaccountmark = default(Int32);
		private decimal _marginmoney = default(Decimal);
		private decimal _prepay1 = default(Decimal);
		private decimal _prepay2 = default(Decimal);
		private decimal _prepay3 = default(Decimal);
		private decimal _prepay4 = default(Decimal);
		private decimal _prepay5 = default(Decimal);
		private decimal _prepay6 = default(Decimal);
		private string _prepay0 = String.Empty;
		private decimal _specialmoney = default(Decimal);
		
		
		
		#endregion

        #region Constructors

        public HBalanceRecord() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_balanceid);
			sb.Append(_operatetype);
			sb.Append(_invoiceid);
			sb.Append(_inhosid);
			sb.Append(_currentinhosmark);
			sb.Append(_leavehosdate);
			sb.Append(_inhosdays);
			sb.Append(_balancedate);
			sb.Append(_totalconsumemoney);
			sb.Append(_paymentmoney);
			sb.Append(_infactmoney);
			sb.Append(_cashreturn);
			sb.Append(_chequereturn);
			sb.Append(_operatedate);
			sb.Append(_operatorid);
			sb.Append(_cashadvance);
			sb.Append(_chequeadvance);
			sb.Append(_patchmoney);
			sb.Append(_discountpay);
			sb.Append(_personalmoney);
			sb.Append(_agreementmoney);
			sb.Append(_outhosarrearage);
			sb.Append(_yeardiscountpayaccumulative);
			sb.Append(_yeardiscountpaymoney);
			sb.Append(_startmoney);
			sb.Append(_medicareaccumulativemoney);
			sb.Append(_personalaccountpay);
			sb.Append(_midaccountmark);
			sb.Append(_marginmoney);
			sb.Append(_prepay1);
			sb.Append(_prepay2);
			sb.Append(_prepay3);
			sb.Append(_prepay4);
			sb.Append(_prepay5);
			sb.Append(_prepay6);
			sb.Append(_prepay0);
			sb.Append(_specialmoney);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public override string Id
		{
			get
			{
				System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
				uniqueId.Append(_balanceid.ToString());
				uniqueId.Append("^");
				uniqueId.Append(_operatetype.ToString());
				uniqueId.Append("^");
				uniqueId.Append(_invoiceid.ToString());
				return uniqueId.ToString();
			}
		}
		
		public virtual int Balanceid
        {
            get { return _balanceid; }
			set
			{
				OnBalanceidChanging();
				_balanceid = value;
				OnBalanceidChanged();
			}
        }
		partial void OnBalanceidChanging();
		partial void OnBalanceidChanged();
		
		public virtual int Operatetype
        {
            get { return _operatetype; }
			set
			{
				OnOperatetypeChanging();
				_operatetype = value;
				OnOperatetypeChanged();
			}
        }
		partial void OnOperatetypeChanging();
		partial void OnOperatetypeChanged();
		
		public virtual string Invoiceid
        {
            get { return _invoiceid; }
			set
			{
				OnInvoiceidChanging();
				_invoiceid = value;
				OnInvoiceidChanged();
			}
        }
		partial void OnInvoiceidChanging();
		partial void OnInvoiceidChanged();
		
		public virtual string Inhosid
        {
            get { return _inhosid; }
			set
			{
				OnInhosidChanging();
				_inhosid = value;
				OnInhosidChanged();
			}
        }
		partial void OnInhosidChanging();
		partial void OnInhosidChanged();
		
		public virtual int Currentinhosmark
        {
            get { return _currentinhosmark; }
			set
			{
				OnCurrentinhosmarkChanging();
				_currentinhosmark = value;
				OnCurrentinhosmarkChanged();
			}
        }
		partial void OnCurrentinhosmarkChanging();
		partial void OnCurrentinhosmarkChanged();
		
		public virtual System.DateTime Leavehosdate
        {
            get { return _leavehosdate; }
			set
			{
				OnLeavehosdateChanging();
				_leavehosdate = value;
				OnLeavehosdateChanged();
			}
        }
		partial void OnLeavehosdateChanging();
		partial void OnLeavehosdateChanged();
		
		public virtual int Inhosdays
        {
            get { return _inhosdays; }
			set
			{
				OnInhosdaysChanging();
				_inhosdays = value;
				OnInhosdaysChanged();
			}
        }
		partial void OnInhosdaysChanging();
		partial void OnInhosdaysChanged();
		
		public virtual System.DateTime Balancedate
        {
            get { return _balancedate; }
			set
			{
				OnBalancedateChanging();
				_balancedate = value;
				OnBalancedateChanged();
			}
        }
		partial void OnBalancedateChanging();
		partial void OnBalancedateChanged();
		
		public virtual decimal Totalconsumemoney
        {
            get { return _totalconsumemoney; }
			set
			{
				OnTotalconsumemoneyChanging();
				_totalconsumemoney = value;
				OnTotalconsumemoneyChanged();
			}
        }
		partial void OnTotalconsumemoneyChanging();
		partial void OnTotalconsumemoneyChanged();
		
		public virtual decimal Paymentmoney
        {
            get { return _paymentmoney; }
			set
			{
				OnPaymentmoneyChanging();
				_paymentmoney = value;
				OnPaymentmoneyChanged();
			}
        }
		partial void OnPaymentmoneyChanging();
		partial void OnPaymentmoneyChanged();
		
		public virtual decimal? Infactmoney
        {
            get { return _infactmoney; }
			set
			{
				OnInfactmoneyChanging();
				_infactmoney = value;
				OnInfactmoneyChanged();
			}
        }
		partial void OnInfactmoneyChanging();
		partial void OnInfactmoneyChanged();
		
		public virtual decimal Cashreturn
        {
            get { return _cashreturn; }
			set
			{
				OnCashreturnChanging();
				_cashreturn = value;
				OnCashreturnChanged();
			}
        }
		partial void OnCashreturnChanging();
		partial void OnCashreturnChanged();
		
		public virtual decimal Chequereturn
        {
            get { return _chequereturn; }
			set
			{
				OnChequereturnChanging();
				_chequereturn = value;
				OnChequereturnChanged();
			}
        }
		partial void OnChequereturnChanging();
		partial void OnChequereturnChanged();
		
		public virtual System.DateTime Operatedate
        {
            get { return _operatedate; }
			set
			{
				OnOperatedateChanging();
				_operatedate = value;
				OnOperatedateChanged();
			}
        }
		partial void OnOperatedateChanging();
		partial void OnOperatedateChanged();
		
		public virtual string Operatorid
        {
            get { return _operatorid; }
			set
			{
				OnOperatoridChanging();
				_operatorid = value;
				OnOperatoridChanged();
			}
        }
		partial void OnOperatoridChanging();
		partial void OnOperatoridChanged();
		
		public virtual decimal Cashadvance
        {
            get { return _cashadvance; }
			set
			{
				OnCashadvanceChanging();
				_cashadvance = value;
				OnCashadvanceChanged();
			}
        }
		partial void OnCashadvanceChanging();
		partial void OnCashadvanceChanged();
		
		public virtual decimal Chequeadvance
        {
            get { return _chequeadvance; }
			set
			{
				OnChequeadvanceChanging();
				_chequeadvance = value;
				OnChequeadvanceChanged();
			}
        }
		partial void OnChequeadvanceChanging();
		partial void OnChequeadvanceChanged();
		
		public virtual decimal Patchmoney
        {
            get { return _patchmoney; }
			set
			{
				OnPatchmoneyChanging();
				_patchmoney = value;
				OnPatchmoneyChanged();
			}
        }
		partial void OnPatchmoneyChanging();
		partial void OnPatchmoneyChanged();
		
		public virtual decimal Discountpay
        {
            get { return _discountpay; }
			set
			{
				OnDiscountpayChanging();
				_discountpay = value;
				OnDiscountpayChanged();
			}
        }
		partial void OnDiscountpayChanging();
		partial void OnDiscountpayChanged();
		
		public virtual decimal Personalmoney
        {
            get { return _personalmoney; }
			set
			{
				OnPersonalmoneyChanging();
				_personalmoney = value;
				OnPersonalmoneyChanged();
			}
        }
		partial void OnPersonalmoneyChanging();
		partial void OnPersonalmoneyChanged();
		
		public virtual decimal Agreementmoney
        {
            get { return _agreementmoney; }
			set
			{
				OnAgreementmoneyChanging();
				_agreementmoney = value;
				OnAgreementmoneyChanged();
			}
        }
		partial void OnAgreementmoneyChanging();
		partial void OnAgreementmoneyChanged();
		
		public virtual decimal? Outhosarrearage
        {
            get { return _outhosarrearage; }
			set
			{
				OnOuthosarrearageChanging();
				_outhosarrearage = value;
				OnOuthosarrearageChanged();
			}
        }
		partial void OnOuthosarrearageChanging();
		partial void OnOuthosarrearageChanged();
		
		public virtual decimal Yeardiscountpayaccumulative
        {
            get { return _yeardiscountpayaccumulative; }
			set
			{
				OnYeardiscountpayaccumulativeChanging();
				_yeardiscountpayaccumulative = value;
				OnYeardiscountpayaccumulativeChanged();
			}
        }
		partial void OnYeardiscountpayaccumulativeChanging();
		partial void OnYeardiscountpayaccumulativeChanged();
		
		public virtual decimal Yeardiscountpaymoney
        {
            get { return _yeardiscountpaymoney; }
			set
			{
				OnYeardiscountpaymoneyChanging();
				_yeardiscountpaymoney = value;
				OnYeardiscountpaymoneyChanged();
			}
        }
		partial void OnYeardiscountpaymoneyChanging();
		partial void OnYeardiscountpaymoneyChanged();
		
		public virtual decimal Startmoney
        {
            get { return _startmoney; }
			set
			{
				OnStartmoneyChanging();
				_startmoney = value;
				OnStartmoneyChanged();
			}
        }
		partial void OnStartmoneyChanging();
		partial void OnStartmoneyChanged();
		
		public virtual decimal Medicareaccumulativemoney
        {
            get { return _medicareaccumulativemoney; }
			set
			{
				OnMedicareaccumulativemoneyChanging();
				_medicareaccumulativemoney = value;
				OnMedicareaccumulativemoneyChanged();
			}
        }
		partial void OnMedicareaccumulativemoneyChanging();
		partial void OnMedicareaccumulativemoneyChanged();
		
		public virtual decimal Personalaccountpay
        {
            get { return _personalaccountpay; }
			set
			{
				OnPersonalaccountpayChanging();
				_personalaccountpay = value;
				OnPersonalaccountpayChanged();
			}
        }
		partial void OnPersonalaccountpayChanging();
		partial void OnPersonalaccountpayChanged();
		
		public virtual int Midaccountmark
        {
            get { return _midaccountmark; }
			set
			{
				OnMidaccountmarkChanging();
				_midaccountmark = value;
				OnMidaccountmarkChanged();
			}
        }
		partial void OnMidaccountmarkChanging();
		partial void OnMidaccountmarkChanged();
		
		public virtual decimal Marginmoney
        {
            get { return _marginmoney; }
			set
			{
				OnMarginmoneyChanging();
				_marginmoney = value;
				OnMarginmoneyChanged();
			}
        }
		partial void OnMarginmoneyChanging();
		partial void OnMarginmoneyChanged();
		
		public virtual decimal Prepay1
        {
            get { return _prepay1; }
			set
			{
				OnPrepay1Changing();
				_prepay1 = value;
				OnPrepay1Changed();
			}
        }
		partial void OnPrepay1Changing();
		partial void OnPrepay1Changed();
		
		public virtual decimal Prepay2
        {
            get { return _prepay2; }
			set
			{
				OnPrepay2Changing();
				_prepay2 = value;
				OnPrepay2Changed();
			}
        }
		partial void OnPrepay2Changing();
		partial void OnPrepay2Changed();
		
		public virtual decimal Prepay3
        {
            get { return _prepay3; }
			set
			{
				OnPrepay3Changing();
				_prepay3 = value;
				OnPrepay3Changed();
			}
        }
		partial void OnPrepay3Changing();
		partial void OnPrepay3Changed();
		
		public virtual decimal Prepay4
        {
            get { return _prepay4; }
			set
			{
				OnPrepay4Changing();
				_prepay4 = value;
				OnPrepay4Changed();
			}
        }
		partial void OnPrepay4Changing();
		partial void OnPrepay4Changed();
		
		public virtual decimal Prepay5
        {
            get { return _prepay5; }
			set
			{
				OnPrepay5Changing();
				_prepay5 = value;
				OnPrepay5Changed();
			}
        }
		partial void OnPrepay5Changing();
		partial void OnPrepay5Changed();
		
		public virtual decimal Prepay6
        {
            get { return _prepay6; }
			set
			{
				OnPrepay6Changing();
				_prepay6 = value;
				OnPrepay6Changed();
			}
        }
		partial void OnPrepay6Changing();
		partial void OnPrepay6Changed();
		
		public virtual string Prepay0
        {
            get { return _prepay0; }
			set
			{
				OnPrepay0Changing();
				_prepay0 = value;
				OnPrepay0Changed();
			}
        }
		partial void OnPrepay0Changing();
		partial void OnPrepay0Changed();
		
		public virtual decimal Specialmoney
        {
            get { return _specialmoney; }
			set
			{
				OnSpecialmoneyChanging();
				_specialmoney = value;
				OnSpecialmoneyChanged();
			}
        }
		partial void OnSpecialmoneyChanging();
		partial void OnSpecialmoneyChanged();
		
        #endregion
    }
}
